package primary.code06_graph;

/**
 * @author Yudi Wang
 * @date 2021/7/16 11:03
 */
public class Edge implements Comparable<Edge>{
    public Node from;
    public Node to;
    public Integer weight;

    public Edge() {
    }

    public Edge(Node from, Node to, Integer weight) {
        this.from = from;
        this.to = to;
        this.weight = weight;
    }

    @Override
    public int compareTo(Edge o) {
        return this.weight - o.weight;
    }
}
